<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>卡密下载</title>
    <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Orbitron', sans-serif;
            background-color: #000;
            color: #fff;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            overflow: hidden;
        }
        .container {
            text-align: center;
            position: relative;
            z-index: 2;
        }
        .input-container {
            position: relative;
            width: 300px;
            margin: 20px auto;
        }
        .input-container input {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 5px;
            outline: none;
            font-size: 18px;
        }
        .input-container::before, .input-container::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 2px solid transparent;
            border-radius: 5px;
            background: linear-gradient(45deg, #00f, #0ff, #0f0, #ff0, #f00, #f0f, #00f);
            background-size: 400%;
            z-index: -1;
            animation: animate 8s linear infinite;
        }
        .input-container::after {
            filter: blur(15px);
        }
        @keyframes animate {
            0% { background-position: 0 0; }
            100% { background-position: 400% 0; }
        }
        .button {
            padding: 15px 30px;
            margin-top: 20px;
            border: none;
            border-radius: 5px;
            background: linear-gradient(45deg, #0ff, #00f);
            color: #fff;
            font-size: 18px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            z-index: 1;
        }
        .button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 300%;
            height: 300%;
            background: linear-gradient(45deg, #0ff, #00f);
            transition: all 0.5s;
            border-radius: 50%;
            z-index: -1;
            transform: translate(-50%, -50%) scale(0);
        }
        .button:hover::before {
            transform: translate(-50%, -50%) scale(1);
        }
        .matrix {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1;
        }
    </style>
</head>
<body>
    <div class="matrix" id="matrix"></div>
    <div class="container">
        <h1>请输入您的卡密</h1>
        <div class="input-container">
            <input type="text" id="cardKey" placeholder="输入卡密...">
        </div>
        <button class="button" onclick="download()">下载</button>
    </div>

    <script>
        function download() {
            const cardKey = document.getElementById('cardKey').value;
            if (cardKey) {
                alert(`卡密: ${cardKey} - 开始下载`);
                // 在这里添加下载逻辑，例如发起一个请求下载文件
            } else {
                alert('请输入卡密');
            }
        }

        // 代码雨效果
        const canvas = document.createElement('canvas');
        const context = canvas.getContext('2d');
        document.getElementById('matrix').appendChild(canvas);

        canvas.width = window.innerWidth;
        canvas.height = window.innerHeight;

        const letters = '0123456789ABCDEF'.split('');
        const fontSize = 16;
        const columns = canvas.width / fontSize;
        const drops = [];
        const colors = ['#FF0', '#F00', '#0F0', '#00F', '#0FF', '#F0F'];

        for (let x = 0; x < columns; x++) {
            drops[x] = 1;
        }

        function draw() {
            context.fillStyle = 'rgba(0, 0, 0, 0.05)';
            context.fillRect(0, 0, canvas.width, canvas.height);

            for (let i = 0; i < drops.length; i++) {
                context.fillStyle = colors[Math.floor(Math.random() * colors.length)];
                context.font = fontSize + 'px monospace';

                const text = letters[Math.floor(Math.random() * letters.length)];
                context.fillText(text, i * fontSize, drops[i] * fontSize);

                if (drops[i] * fontSize > canvas.height && Math.random() > 0.975) {
                    drops[i] = 0;
                }

                drops[i]++;
            }
        }

        setInterval(draw, 33);
    </script>
</body>
</html>
